<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "mops_activity".
 *
 * @property int $id
 * @property string $name 活动名称
 * @property int $start_time 开始时间
 * @property int $end_time 结束时间
 * @property int $coupon_catalog  优惠券分类
 * @property int $status 1:未开始 2:进行中 3:已抢光
 */
class Activity extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'mops_activity';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'start_time', 'end_time', 'coupon_catalog'], 'required'],
            [['start_time', 'end_time', 'coupon_catalog', 'status'], 'integer'],
            [['name'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'start_time' => 'Start Time',
            'end_time' => 'End Time',
            'coupon_catalog' => 'Coupon Catalog',
            'status' => 'Status',
        ];
    }
}
